<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>添加博客</title>
    <link rel="icon" th:href="@{../img/title.png}" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link th:href="@{/admin/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/admin/css/materialdesignicons.min.css}" rel="stylesheet">
    <!--标签插件-->
    <link rel="stylesheet"
          th:href="@{/admin/js/jquery-tags-input/jquery.tagsinput.min.css}">
    <link th:href="@{/admin/css/style.min.css}" rel="stylesheet">


</head>

<body>
<div class="container-fluid p-t-15">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <form class="row" method="get">
                        <div class="form-group col-md-12">
                            <label for="type">博客分类</label>
                            <div class="form-controls">
                                <select name="type_id" class="form-control" id="type">
                                    <option th:value="${blogtype.id}" th:each="blogtype : ${blogTypes}"
                                            th:text="${blogtype.typeName}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-md-12">
                            <label for="title">标题</label>
                            <input type="text" class="form-control" id="title" required name="title" value=""
                                   placeholder="请输入标题"/>
                        </div>
                        <div class="form-group col-md-12">
                            <label for="keyword">关键词</label>
                            <input type="text" class="form-control" id="keyword" required name="keyword" value=""
                                   placeholder="关键词"/>
                        </div>

                        <div class="form-group col-md-12">
                            <label for="image">图片链接</label>
                            <input class="form-control" id="image" required name="image" value=""
                                   placeholder="图片链接"/>
                        </div>
                        <div class="form-group col-md-12">
                            <label for="introduction">描述</label>
                            <textarea class="form-control" id="introduction" required name="introduction" rows="5"
                                      value=""
                                      placeholder="描述"></textarea>
                        </div>


                        <div class="form-group col-md-12" id="editor">
                            <label for="div1">内容</label>
                            <div id="div1" style="z-index: 1">

                            </div>
                        </div>
                        <div class="form-group col-md-12" id="status">
                            <label>状态</label>
                            <div class="clearfix">
                                <label class="lyear-radio radio-inline radio-primary">
                                    <input type="radio" name="status" value="0"><span>禁用</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary">
                                    <input type="radio" name="status" value="1" checked><span>启用</span>
                                </label>
                            </div>
                        </div>
                        <div class="form-group col-md-12">
                            <a type="submit" class="btn btn-primary ajax-post" target-form="add-form"
                                    th:onclick="sumbit()">确 定
                            </a>
                            <button type="button" class="btn btn-default"
                                    onclick="javascript:history.back(-1);return false;">返 回
                            </button>
                        </div>
                    </form>

                </div>
            </div>
        </div>

    </div>

</div>

<script type="text/javascript" th:src="@{/admin/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/bootstrap.min.js}"></script>
<!--    弹窗-->
<script th:src="@{/admin/js/admin/addBlog.js}"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<!--标签插件-->
<!--标签插件-->
<script th:src="@{/admin/js/jquery-tags-input/jquery.tagsinput.min.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/main.min.js}"></script>
<!--文本-->
<script type="text/javascript" src="//unpkg.com/wangeditor/dist/wangEditor.min.js"></script>
<script type="text/javascript">
    let E = window.wangEditor
    let editor = new E('#div1')
    editor.config.zIndex = 5
    editor.create()
</script>
</body>
</html>